/*
*	冰火家族萬能NPC
*
*
*
*
*
*/
var x = "#fEffect/CharacterEff/1112949/0/0#";//高音譜記號
var kk = "#fEffect/BasicEff/MainNotice/Boss/Default/0#";//BOSS
var c = "#fEffect/CharacterEff/1032063/0/0#";//"#fUI/UIMiniGame/starPlanetRPS/heart#";//愛心
var cmark = "#fUI/UIMiniGame/starPlanetRPS/heart#";//愛心
var lb = "#fEffect/ItemEff/1112811/0/0#";//藍色小光
var b = "#fEffect/CharacterEff/Shaman/1#";//超萌熊熊
var cat = "#fEffect/CharacterEff/Shaman/4#";//超萌喵咪
var leaf = "#fUI/Basic.img/Cursor/18/0#";
var selec;
var status;


var monstermaps = Array(
		Array(925020000, '#fs15##g#e武陵道場#n#b#fs12#',true),
        Array(50000, "嫩寶#r(1~10 等)#d",true),
        Array(101020100, "#b藍水靈",true),
        Array(102030000, "#b黑肥肥",true),
        Array(600020300, "#b機械蜘蛛",true),
        Array(220060000, "#b小丑",true),
        Array(220060201, "#b百列",true),
		Array(251010402, "#b海盜",true),
        Array(240040510, "#b化石龍",true),
        Array(270030100, "#b忘卻之路1",true),
        Array(240093100, "#b石精靈",true),
		Array(401053001, "#b暴君鐮刀怪",true),
		Array(401052000, "#b暴君紫色藥水",true),
		Array(272000300, "#b燃燒的神木村",true),
		Array(450001003, "#b忘卻之湖",true),
		Array(703001200, "#b2022外星人佔領地",true),
		Array(273060300, "#b未來勇士之村", true)
        );
function start() {
    status = -1;
    action(1, 0, 0);
}

function action(mode, type, selection) {

    if (mode == 0) {
	cm.dispose();
	return;
    } else if (mode == 1){
	status++;
    } else {
	status--;
    }

    switch (status) {
        case 0: 
			text = "\t  "+c+"#fn华文行楷##fs30##e#k #b練功傳送 " +c+ "\r\n#fs12##fn宋体#";
			for (var i = 0; i < monstermaps.length; i++) {
				if (monstermaps[i][2]) { // 如果允许显示
					if(i == 0)
						text += "\r\n";
					text += "\t\t\t#d#L" + i + "# " + cmark +" " + monstermaps[i][1] + "#l\r\n";
					if(i == 0)
						text += "\r\n";
				}
			}
			text += "\r\n\r\n\t\t   #L999#" + leaf +"#fn华文行楷##fs22##e#r回上一頁#l"
			text += "\r\n\r\n  " +c+c+c+c+c+c;
			cm.sendSimple(text);
            break;
        case 1: //
			switch (selection){
				case 999://回上一頁
					cm.dispose();
					cm.openNpc(1052253, 4);
					break;
				default:
					selec = selection;
					cm.sendYesNo("您已經做好手邊的事情了嗎?\r\n即將為您傳送到 #b#fs15#" + monstermaps[selec][1] + "#fs12#");
					break;
			}
            break;
		case 2:
			if (selec >= 0 && selec < monstermaps.length && monstermaps[selec] != null) {
				cm.warp(monstermaps[selec][0]);
				cm.dispose();
			} else {
				cm.sendOk("傳送出現錯誤 請聯繫管理員");
				cm.dispose();
			}
			break;
        default:
			cm.sendOk("發生錯誤，請聯繫管理員!");
			cm.dispose();
			break;
    }
}
